/**
 * @file rank/popularize/luogu1359/main.cpp
 * @brief
 * @see
 * @author Ruiming Guo (guoruiming@stu.scu.edu.cn)
 * @copyright 2022
 * @date 2022/7/7 22:29:59
 **/

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
const int N = 210;
int dp[N];
int main() {
  // High rating and good luck!
  int n;
  cin >> n;
  memset(dp, 0x3f, sizeof(dp));
  dp[1] = 0;
  for (int i = 1; i < n; ++i) {
    for (int j = i + 1; j <= n; ++j) {
      int cost;
      cin >> cost;
      dp[j] = min(dp[j], dp[i] + cost);
    }
  }
  cout << dp[n] << endl;
  return 0;
}
